#!/usr/bin/bash

i=1
totalTime=150
while [ $i -le 10 ]; do
  # 一直执行命令
  start=$(date +%s)

  python demo/main.py

  end=$(date +%s)
  dif=$((end - start))
  echo "执行花费 $dif s"

  leftTime=$((totalTime - dif))
  echo "剩下 $leftTime s"

  sleep $leftTime

  #  ((i++))

done
